package com.dhcc.bpm.modules.scf.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dhcc.bpm.modules.scf.dto.ScfDriverInfoDTO;
import com.dhcc.bpm.modules.scf.entity.ScfDriverInfo;
import com.dhcc.bpm.modules.scf.vo.ScfDriverInfoVO.ScfGetDriverDetailsVO;
import com.dhcc.bpm.modules.scf.vo.ScfDriverInfoVO.ScfGetDriverListVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface IScfDriverInfoService extends IService<ScfDriverInfo> {
    /**
     * 自定义查询列表
     *
     * @param scfDriverInfo
     * @return
     */
    IPage<ScfGetDriverListVO> selectScfDriverInfoPage(IPage<ScfGetDriverListVO> page, ScfDriverInfoDTO scfDriverInfo);

    /**
     * 查询司机详情
     *
     * @param scfDriverInfo
     * @return
     */
    ScfGetDriverDetailsVO getDetails(ScfDriverInfoDTO scfDriverInfo);

    /**
     * 新增司机信息
     *
     * @param scfDriverInfo
     * @return
     */
    Boolean saveDriver(ScfDriverInfoDTO scfDriverInfo) throws Exception;

    /**
     * 导入司机信息
     *
     * @param scfDriverInfos
     * @return
     */
    int bachSaveDriver(List<ScfDriverInfo> scfDriverInfos, String operatorId);

    /**
     * 更新司机信息
     *
     * @param scfDriverInfo
     * @return
     */
    Boolean updateDrtver(ScfDriverInfoDTO scfDriverInfo);

    /**
     * 司机信息-批量导入
     * 当前用户ID
     *
     * @param file
     * @return
     */
    List<ScfDriverInfo> batchSaveScfDriverInfo(String operatorId, MultipartFile file) throws IOException;

    Boolean deleteByIds(String[] split);
}
